package com.web.service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.web.model.PingInfo;
import com.web.repository.PingRepository;

@Service
public class PingServiceImpl implements PingService {
	
	@Autowired
	private PingRepository pingRepository;
	
	public List<PingInfo> findPings(PingInfo ping) {
		Map<String,Object> params = new HashMap<String,Object>();
		params.put("fromSource", ping.getFromSource());
		List<PingInfo> pings = pingRepository.findPings(params);
		return pings;
	}

}
